import Layout from '../components/Layout'

let routes = [
    {
        path: '/',
        component: Layout,
        redirect: {
            path: '/dashboard'
        },
        meta: {
            title: '默认首页',
            icon: 'el-icon-coin',
            hidden: true
        },
        children: [
            {
                path: 'dashboard',
                meta: {
                    title: '仪表盘',
                    icon: 'el-icon-house'
                },
                component: () => import('../views/dashboard')
            }
        ]
    },
    {
        path: '/system',
        title: '系统管理',
        component: Layout,
        meta: {
            title: '用户家',
            icon: 'el-icon-film'
        },
        children: [
            {
                path: 'user',
                meta: {
                    title: '用户管理',
                    icon: 'el-icon-camera-solid'
                },
                component: () => import('../views/users'),
            },
            {
                path: 'role',
                meta: {
                    title: '角色管理',
                    icon: 'el-icon-s-opportunity'
                },
                component: () => import('../components/Role'),
            },
            {
                path: 'permission',
                meta: {
                    title: '权限管理',
                    icon: 'el-icon-s-cooperation'
                },
                component: () => import('../components/Permission'),
            }
        ]
    },
    {
        path: '/product',
        meta: {
            title: '产品管理',
            icon: 'el-icon-takeaway-box'
        },
        children: [
            {
                path: 'category',
                meta: {
                    title: '品类管理',
                    icon: 'el-icon-suitcase'
                },
            },
            {
                path: 'product',
                meta: {
                    title: '产品管理',
                    icon: 'el-icon-box'
                },
            },
            {
                path: 'active',
                meta: {
                    title: '活动管理',
                    icon: 'el-icon-present'
                },
            },
        ]
    },
    {
        path:'/login',
        component:()=>import('../views/login'),
        meta:{
            title:'登录',
            icon:'',
            hidden:true
        }
    }
]

export default routes